package models

import "time"

type Department struct {
	ID          int64  `gorm:"primaryKey;autoIncrement=false" json:"id"`
	Name        string `gorm:"column:name;type:varchar(255);not null" json:"name"`
	ParentID    int64  `gorm:"column:parent_id;not null" json:"parent_id"`
	DeletedFlag bool   `gorm:"column:deleted_flag;default:false" json:"deleted_flag"`
	Order       int64  `gorm:"column:order;type:int;not null" json:"order"`
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

func (table *Department) TableName() string {
	return "department"
}
